import { onMounted, ref, reactive, computed } from 'vue'
export default function (props, emit) {
  const {formObj, reset, validate} = _.useFormRender({ name: '', school: '', age: '' }, '.schoolForm') // 参数1：初始化入参 + 表单选择器
  async function clickMe(){
    await validate(async () => {
      // 基础校验通过编写业务代码。或者再做复杂校验
      await _.wait(100) 
      console.log(formObj.value)
    })
  }
  onMounted(() => {
    
  })
  return {
    formObj, 
    emit,  reset, validate, clickMe
  }
}